package com.cloud.im.exchanger;

import com.cloud.fim.common.Msg;
import com.cloud.fim.common.constant.SerializeTypeConstants;
import lombok.Getter;

/**
 * <p></p>
 *
 * @author GaoShuangWen
 */
@Getter
public class Request {

    public static final short MAGIC = 0x86;


    public static final short VERSION = 0x01;

    /**
     * the magic
     */
    private short magic= RequestHeader.MAGIC;

    /**
     * version
     */
    private short version = RequestHeader.VERSION;

    private byte cmdId = RequestHeader.VERSION;

    /**
     * the Serialize Type
     * the default value is {SerializeTypeConstants.PROTO_STUFF}
     * @see SerializeTypeConstants
     */
    private byte serializeType = SerializeTypeConstants.PROTO_STUFF;

    Msg requestMsg;

    public void setCmdId(byte cmdId) {
        this.cmdId = cmdId;
    }

    public void setRequestMsg(Msg requestMsg) {
        this.requestMsg = requestMsg;
    }
}
